package com.aaa.doctor.controller;

import com.aaa.doctor.service.CareHistoryService;
import com.aaa.entity.CareHistory;
import com.aaa.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/doctor/caseHistory/")
public class CaseHistoryController {

    @Autowired
    private CareHistoryService careHistoryService;

    /**
     * 根据patientId查询针就诊信息 -- 三表联查
     * @param patientId
     * @return
     */
    @GetMapping("/getCareHistoryByPatientId/{patientId}")
    public Result<List<CareHistory>> getCareHistoryByPatientId(@PathVariable String patientId){
        return careHistoryService.getCareHistoryByPatientId(patientId);
    }
}
